package com.example.yk_lx.chat;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.example.yk_lx.R;
import com.hyphenate.easeui.modules.chat.EaseChatFragment;

@Route(path = "/app/ChatActivity")
public class ChatActivity extends AppCompatActivity {
    @Autowired
    Bundle bundle;
    private MyEaseChatFragment chatFragment;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_chat);

        ARouter.getInstance().inject(this);

        //use EaseChatFratFragment
        chatFragment = new MyEaseChatFragment();
        //pass parameters to chat fragment
        chatFragment.setArguments(bundle);
        getSupportFragmentManager().beginTransaction().add(R.id.container, chatFragment).commit();
    }
}